<div class="layui-fluid layui-anim website-anim-up" id="website-class-apply-entrust-show" lay-title="课题信息详情">
    <div class="layui-row layui-col-space8 website-container">
        <div class="layui-col-md10 layui-col-sm10 layui-col-xs10">
            <div class="layui-card" id="entrust-info">
                <div class="layui-card-header">基本情况</div>
                <div class="layui-card-body layui-form-item">
                    <div class="layui-row">
                        <!-- 基本信息-->
                        <div class="layui-inline layui-col-xs5 layui-col-sm5 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">课题名称：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">[[${result.name}]]</div>
                        </div>
                        <div class="layui-inline layui-col-xs5 layui-col-sm5 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">选题名称：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">[[${result.topic.topicName}]]</div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <!-- 基本信息-->
                        <div class="layui-inline layui-col-xs5 layui-col-sm5 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">申报年份：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">[[${result.topic.year}]]</div>
                        </div>
                        <div class="layui-inline layui-col-xs5 layui-col-sm5 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">申报级别：</div>
                            <div id="levelTypeCode" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">学科分类：</div>
                            <div id="subjectTypeCode" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">研究类型：</div>
                            <div id="researchTypeCode" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6 ">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">拟结项时间：</div>
                            <div id="estimateTime" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">实际结项申请时间：</div>
                            <div id="actualTime" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">课题组织单位：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">
                                [[${result.declareEntrust.topicUnitName}]]
                            </div>
                        </div>
                        <div class="layui-inline layui-col-xs5 layui-col-sm5 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">结项证书：</div>
                            <div class="layui-col-xs9 layui-col-sm9 layui-col-md9">
                                <a id="upload-file-end-a"></a>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row more-add">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs4 layui-col-sm4 layui-col-md4">第二次结项申请截止时间：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8" id="second-off-time">
                            </div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">定级结果：</div>
                            <div class="layui-col-xs9 layui-col-sm9 layui-col-md9" id="finalLevelTypeCode">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-card" id="client-qtr-info">
                <div class="layui-card-header">牵头人信息</div>
                <div class="layui-card-body layui-form-item">

                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">牵头人姓名：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md7">[[${result.initiator.name}]]</div>
                        </div><div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                        <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">出生日期：</div>
                        <div id="initiator-birthday" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                    </div>

                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6 ">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">证件类型：</div>
                            <div id="initiator-identityTypeCode" class="layui-col-xs9 layui-col-sm9 layui-col-md9"></div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">证件号码：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md7">[[${result.initiator.identity}]]
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">性别：</div>
                            <div id="sexTypeCodeQt" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">行政职务：</div>
                            <div id="positionTypeCodeQt" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">政治面貌：</div>
                            <div id="politicalTypeCodeQt" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">民族：</div>
                            <div id="nationTypeCodeQt" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>

                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">工作单位：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">
                                [[${result.initiator.companyAddress}]]
                            </div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">通讯地址：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">[[${result.initiator.address}]]</div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">邮政编码：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">[[${result.initiator.postCode}]]
                            </div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">联系电话：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">[[${result.initiator.telephone}]]
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">手机号：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">[[${result.initiator.mobile}]]</div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-card" id="client-zcr-info">
                <div class="layui-card-header">主持人信息</div>
                <div class="layui-card-body layui-form-item">
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">主持人姓名：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md7">[[${result.leader.name}]]</div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">性别：</div>
                            <div id="sexTypeCode" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6 ">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">证件类型：</div>
                            <div id="identityTypeCode" class="layui-col-xs9 layui-col-sm9 layui-col-md9"></div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">证件号码：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md7">[[${result.leader.identity}]]</div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">出生日期：</div>
                            <div id="leader-birthday" class="layui-col-xs8 layui-col-sm8 layui-col-md8">
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">职称级别：</div>
                            <div id="titleTypeCode" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">职称：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">[[${result.leader.professionCode}]]
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">行政职务：</div>
                            <div id="positionTypeCode" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">民族：</div>
                            <div id="nationTypeCode" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">政治面貌：</div>
                            <div id="politicalTypeCode" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">外语语种：</div>
                            <div id="language" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">最终学位：</div>
                            <div id="degreeTypeCode" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>

                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">担任导师：</div>
                            <div id="tutorTypeCode" class="layui-col-xs8 layui-col-sm8 layui-col-md8"></div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">工作单位：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">[[${result.leader.company}]]</div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">通讯地址：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">[[${result.leader.address}]]</div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">邮政编码：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">[[${result.leader.postCode}]]</div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">电子邮箱：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">[[${result.leader.email}]]</div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">联系电话：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">[[${result.leader.telephone}]]</div>
                        </div>
                        <div class="layui-inline layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">手机号：</div>
                            <div class="layui-col-xs8 layui-col-sm8 layui-col-md8">[[${result.leader.mobile}]]</div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs12 layui-col-sm12 layui-col-md12">
                            <span>个人从事与课题相关领域科研工作的主要履历：</span>
                            <textarea class="layui-textarea layui-disabled" autocomplete="off" readonly
                                      name="leader.field">[[${result.leader.field}]]</textarea>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-card" id="client-class-member">
                <div class="layui-card-header">课题组人员</div>
                <div class="layui-card-body website-table-full">
                    <table id="classApplyMemberTable" lay-filter="classApplyMemberTable"
                           lay-data="{id: 'classApplyMemberTable'}"></table>
                </div>
            </div>
            <div class="layui-card" id="client-class-project-info">
                <div class="layui-card-header">主持人曾经主持省部级以上社科研究项目及完成情况</div>
                <div class="layui-card-body website-table-full">
                    <table lay-filter="classApplyProjectInfoTable" id="classApplyProjectInfoTable"
                           lay-data="{id: 'classApplyProjectInfoTable'}"></table>
                </div>
            </div>
            <!--         研究基础和研究条件       -->
            <div class="layui-card">
                <div class="layui-card-header">研究基础和研究条件</div>
                <div class="layui-card-body">
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs5 layui-col-sm5 layui-col-md12">
                            <span>主持人近五年发表、出版的相关研究成果（注明刊物的年、期或出版社、出版日期）</span>
                            <textarea class="layui-textarea layui-disabled" name="leaderWorks5" readonly
                                      autocomplete="off">[[${result.leaderWorks5}]]</textarea>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs5 layui-col-sm5 layui-col-md12">
                            <span>课题组成员近3年发表、出版的与本课题有关的主要研究成果（注明刊物的年、期或出版社、出版日期）</span>
                            <textarea class="layui-textarea layui-disabled" name="memberWorks3" readonly
                                      autocomplete="off">[[${result.memberWorks3}]]</textarea>

                        </div>
                    </div>
                </div>
            </div>
            <!-- 课题论证-->
            <div class="layui-card" id="client-class-Solicit">
                <div class="layui-card-header">课题论证</div>
                <div class="layui-card-body">
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs5 layui-col-sm5 layui-col-md12">
                            <span>一、对选题的实践价值和理论价值的理解（限500字）</span>
                            <textarea class="layui-textarea layui-disabled" name="proofUnderstand" readonly
                                      autocomplete="off">[[${result.declareEntrust.proofUnderstand}]]</textarea>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs5 layui-col-sm5 layui-col-md12">
                            <span>二、主要研究内容、研究思路、研究的重点、难点及可能的创新之处（限1500字）</span>
                            <textarea class="layui-textarea layui-disabled" name="proofInnovate" readonly
                                      autocomplete="off">[[${result.declareEntrust.proofInnovate} ]]</textarea>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs5 layui-col-sm5 layui-col-md12">
                            <span>三、研究方法和课题组合作机制（限800字）</span>
                            <textarea class="layui-textarea layui-disabled" name="proofMechanism" readonly
                                      autocomplete="off">[[${result.declareEntrust.proofMechanism}]]</textarea>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 研究计划-->
            <div class="layui-card" id="client-class-plan">
                <div class="layui-card-header">研究计划</div>
                <div class="layui-card-body">
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs5 layui-col-sm5 layui-col-md12">
                            <span>（本课题研究周期为1年。请制定研究进度计划、推进的方式、每一阶段的成果目标，限1000字）</span>
                            <textarea class="layui-textarea layui-disabled" name="researchPlan" readonly
                                      autocomplete="off">[[${result.declareEntrust.researchPlan}]]</textarea>
                        </div>
                    </div>
                </div>

            </div>
            <div class="layui-card" id="client-class-draft-achievement">
                <div class="layui-card-header">拟完成的研究成果</div>
                <div class="layui-card-body website-table-full">
                    <table lay-filter="classDraftAchievementTable" id="classDraftAchievementTable"
                           lay-data="{id: 'classDraftAchievementTable'}"></table>
                </div>
            </div>

            <div class="layui-card" id="client-class-postpone-apply">
                <div class="layui-card-header">延期申请记录</div>
                <div class="layui-card-body website-table-full">
                    <table lay-filter="classPostponeApplyTable" id="classPostponeApplyTable"
                           lay-data="{id: 'classPostponeApplyTable'}"></table>
                </div>
            </div>
            <div class="layui-card" id="client-class-end-apply">
                <div class="layui-card-header">结项申请记录</div>
                <div class="layui-card-body website-table-full">
                    <table lay-filter="classEndApplyTable" id="classEndApplyTable"
                           lay-data="{id: 'classEndApplyTable'}"></table>
                </div>

            </div>
            <div class="layui-card" id="client-class-applyLog">
                <div class="layui-card-header">审核记录</div>
                <div class="layui-card-body website-table-full">
                    <table id="classApplyLogTable" lay-filter="classApplyLogTable"
                           lay-data="{id: 'classApplyLogTable'}"></table>
                </div>
                <div class="layui-card-footer">
                    <button class="layui-btn layui-btn-warm" id="clean">返回</button>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="sex-type">
    {{#
    let dict=layui.dict.getByCode(d.sexTypeCode);
    }}
    {{#  if(dict){ }}
    <span>{{ dict.name }}</span>
    {{#  } }}
</script>
<script type="text/html" id="position-type">
    {{#
    let dict=layui.dict.getByCode(d.positionTypeCode);
    }}
    {{#  if(dict){ }}
    <span>{{ dict.name }}</span>
    {{#  } }}
</script>
<script type="text/html" id="title-type">
    {{#
    let dict=layui.dict.getByCode(d.titleTypeCode);
    }}
    {{#  if(dict){ }}
    <span>{{ dict.name }}</span>
    {{#  } }}
</script>
<script type="text/html" id="degree-type">
    {{#
    let dict=layui.dict.getByCode(d.degreeTypeCode);
    }}
    {{#  if(dict){ }}
    <span>{{ dict.name }}</span>
    {{#  } }}
</script>
<script type="text/html" id="is-finish">
    {{#  if(d.isFinish){ }}
    <span>已结项</span>
    {{#  }else { }}
    <span>未结项</span>
    {{#  }  }}
</script>
<script type="text/html" id="performance-name-type">
    {{#
    let dictList=layui.dict.getByCodes(d.performance ? d.performance.split(','): '');
    }}
    <span>
    {{# layui.each(dictList,function(index,item) { }}
    {{ item.name }}&nbsp;
    {{#  }); }}
    </span>
</script>
<script type="text/html" id="achievement-form-name-type">
    {{#
    let dictList=layui.dict.getByCodes(d.achievementFormTypeCode ? d.achievementFormTypeCode.split(','): '');
    }}
    <span>
    {{# layui.each(dictList,function(index,item) { }}
    {{ item.name }}&nbsp;
    {{#  }); }}
    </span>
</script>
<script type="text/html" id="checkType">
    {{#
    let dict=layui.dict.getByCode(d.checkType);
    }}
    {{#  if(dict){ }}
    <span>{{ dict.name }}</span>
    {{#  } }}
</script>
<script type="text/html" id="identity-type">
    {{#
    let dict=layui.dict.getByCode(d.identityTypeCode);
    }}
    {{#  if(dict){ }}
    <span>{{ dict.name }}</span>
    {{#  } }}
</script>

<script data-th-inline="javascript" type="text/javascript">
    layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'website', 'dict'], function () {
        let $ = layui.jquery,
            laydate = layui.laydate,
            website = layui.website,
            form = layui.form,
            table = layui.table,
            dropdown = layui.dropdown,

            $view = $('#website-class-apply-entrust-show'),
            $projectView = $('#client-class-project-info'),
            $memberView = $('#client-class-member'),
            $achievementView = $('#client-class-draft-achievement'),
            $postponeView = $('#client-class-postpone-apply'),
            $endView = $('#client-class-end-apply'),
            $applyLogView = $('#client-class-applyLog'),
            $addProject = $projectView.find('.action-add-project-info'),
            $addMember = $memberView.find('.action-add-member'),

            result = [[${result}]],

            memberTableIns,
            projectInfoTableIns,
            applyLogTableIns,
            draftAchievementTableIns
        ;

        document.getElementById('website-class-apply-entrust-show').scrollIntoView();
        initForm()
        // 重新渲染 form否则不会显示下拉框
        form.render();
        initMemberTable();
        initProjectInfoTable();
        initDraftAchievement();
        initEndApplyTable();
        initPostponeApplyTable();
        iniApplyLogTable();

        function initProjectInfoTable() {
            projectInfoTableIns = website.table.init({
                elem: $projectView.find('table'),
                id: 'classApplyProjectInfoTable',
                url: ctx + result.declareId + '/leaderProject/list',
                cols: [
                    [
                        {type: 'numbers', title: '序号', width: '8%'},
                        {field: 'projectSource', title: '项目来源', width: '17%'},
                        {field: 'type', title: '类别', width: '20%'},
                        {field: 'topicName', title: '课题名称', width: '20%'},
                        {field: 'projectTime', title: '立项时间', width: '20%'},
                        {title: '是否结项', templet: '#is-finish', width: '15%'}
                    ]
                ]
            });
        }

        function initDraftAchievement() {
            draftAchievementTableIns = website.table.init({
                elem: $achievementView.find('table'),
                id: 'classDraftAchievementTable',
                url: ctx + result.declareId + '/draftAchievement/list',
                cols: [
                    [
                        {type: 'numbers', title: '序号', width: '8%'},
                        {templet: '#performance-name-type', title: '成果形式', width: '32%'},
                        {field: 'number', title: '成果字数（万字）', width: '30%'},
                        {field: 'completeTime', title: '完成时间', width: '30%'}
                    ]
                ]
            });
        }

        function initPostponeApplyTable() {
            draftAchievementTableIns = website.table.init({
                elem: $postponeView.find('table'),
                id: 'classPostponeApplyTable',
                url: ctx + 'delayApply/list',
                where: {
                    declareId: result.declareId,
                },
                cols: [
                    [
                        {type: 'numbers', title: '序号', width: '8%'},
                        {field: 'duration', title: '延期时长', width: '22%'},
                        {field: 'term', title: '延期期限', width: '10%'},
                        {field: 'reason', title: '延期理由', width: '20%'},
                        {
                            title: '附件', width: '30%', templet: function (d) {
                                let html = '<a '
                                if (d.delayFileId) {
                                    html += 'href="' + ctx + 'download/' + d.delayFileId + '" >'
                                    html += '点击下载'
                                } else {
                                    html += ' >'
                                    html += '无附件'
                                }
                                html += '</a>'
                                return html;
                            }
                        }
                    ]
                ]
            });
        }

        function initEndApplyTable() {
            draftAchievementTableIns = website.table.init({
                elem: $endView.find('table'),
                id: 'classEndApplyTable',
                url: ctx + 'declarePlan/list',
                where: {
                    declareId: result.declareId,
                },
                cols: [
                    [
                        {type: 'numbers', title: '序号', width: '8%'},
                        {
                            title: '结项申请书', width: '12%', templet: function (d) {
                                let html = '<a '
                                if (d.fileApplyId) {
                                    html += 'href="' + ctx + 'download/' + d.fileApplyId + '" >'
                                    html += '点击下载'
                                } else {
                                    html += ' >'
                                    html += '无附件'
                                }
                                html += '</a>'
                                return html;
                            }
                        },
                        {
                            title: '显名附件', width: '12%', templet: function (d) {
                                let html = '<a '
                                if (d.fileShowId) {
                                    html += 'href="' + ctx + 'download/' + d.fileShowId + '" >'
                                    html += '点击下载'
                                } else {
                                    html += ' >'
                                    html += '无附件'
                                }
                                html += '</a>'
                                return html;
                            }
                        },
                        {
                            title: '匿名附件', width: '10%', templet: function (d) {
                                let html = '<a '
                                if (d.fileHideId) {
                                    html += 'href="' + ctx + 'download/' + d.fileHideId + '" >'
                                    html += '点击下载'
                                } else {
                                    html += ' >'
                                    html += '无附件'
                                }
                                html += '</a>'
                                return html;
                            }
                        },
                        {templet: '#achievement-form-name-type', title: '成果形式', width: '30%'},
                        {field: 'number', title: '成果字数'}
                    ]
                ]
            });
        }

        function initMemberTable() {
            memberTableIns = website.table.init({
                elem: $memberView.find('table'),
                id: 'classApplyMemberTable',
                url: ctx + result.declareId + '/memberInfo/list',
                cols: [
                    [
                        {type: 'numbers', title: '序号', width: '6%'},
                        {field: 'name', title: '姓名', width: '8%'},
                        {title: '性别', templet: '#sex-type', width: '6%'},
                        {field: 'birthday', title: '出生年月', width: '10%'},
                        {title: '职务', templet: '#position-type', width: '10%'},
                        {title: '职称级别', templet: '#title-type'},
                        {title: '职称', field: 'professionCode'},
                        {title: '最终学位', templet: '#degree-type', width: '10%'},
                        {field: 'field', title: '研究领域', width: '8%'},
                        {templet: '#identity-type', title: '证件类型'},
                        {field: 'identity', title: '证件号', width: '8%'},
                        {field: 'companyAddress', title: '工作单位', width: '8%'},
                        {field: 'mobile', title: '联系电话', width: '8%'},
                        {field: 'email', title: '电子邮箱', width: '8%'}
                    ]
                ]
            });
        }

        function iniApplyLogTable() {
            applyLogTableIns = website.table.init({
                elem: $applyLogView.find('table'),
                id: 'classApplyLogTable',
                url: ctx + result.declareId + '/entrustCheckLog/list',
                cols: [
                    [
                        {type: 'numbers', title: '序号'},
                        {title: '类型', templet: '#checkType',},
                        {field: 'createTime', title: '审核时间'},
                        {field: 'checkName', title: '审核人姓名'},
                        {field: 'reason', title: '原因'}
                    ]
                ]
            });
        };

        $('#btnClose').on('click', function () {
            layer.closeAll();
        });

        function initForm() {
            //日期转换
            $("#estimateTime").text(result.declareEntrust.estimateTime ? layui.util.toDateString(result.declareEntrust.estimateTime, 'yyyy-MM-dd') : '');
            $("#actualTime").text(result.declareEntrust.actualTime ? layui.util.toDateString(result.declareEntrust.actualTime, 'yyyy-MM-dd') : '');
            $("#leader-birthday").text(result.leader.birthday ? layui.util.toDateString(result.leader.birthday, 'yyyy-MM-dd') : '');
            $("#initiator-birthday").text(result.initiator.birthday ? layui.util.toDateString(result.initiator.birthday, 'yyyy-MM-dd') : '');

            $("#achievementFormTypeCode").text(result.achievementFormTypeCode ? achievementFormTypeCodeName(result.achievementFormTypeCode) : '');
            $("#subjectTypeCode").text(result.subjectTypeCode ? layui.dict.getByCode(result.subjectTypeCode).name : '');
            $("#finalLevelTypeCode").text(result.finalLevelTypeCode ? layui.dict.getByCode(result.finalLevelTypeCode).name : '');
            $("#researchTypeCode").text(result.researchTypeCode ? layui.dict.getByCode(result.researchTypeCode).name : '');
            $("#sexTypeCode").text(result.leader.sexTypeCode ? layui.dict.getByCode(result.leader.sexTypeCode).name : '');
            $("#sexTypeCodeQt").text(result.initiator.sexTypeCode ? layui.dict.getByCode(result.initiator.sexTypeCode).name : '');
            $("#positionTypeCode").text(result.leader.positionTypeCode ? layui.dict.getByCode(result.leader.positionTypeCode).name : '');
            $("#positionTypeCodeQt").text(result.initiator.positionTypeCode ? layui.dict.getByCode(result.initiator.positionTypeCode).name : '');
            $("#titleTypeCode").text(result.leader.titleTypeCode ? layui.dict.getByCode(result.leader.titleTypeCode).name : '');
            $("#titleTypeCodeQt").text(result.initiator.titleTypeCode ? layui.dict.getByCode(result.initiator.titleTypeCode).name : '');
            $("#nationTypeCode").text(result.leader.nationTypeCode ? layui.dict.getByCode(result.leader.nationTypeCode).name : '');
            $("#nationTypeCodeQt").text(result.initiator.nationTypeCode ? layui.dict.getByCode(result.initiator.nationTypeCode).name : '');
            $("#politicalTypeCode").text(result.leader.politicalTypeCode ? layui.dict.getByCode(result.leader.politicalTypeCode).name : '');
            $("#politicalTypeCodeQt").text(result.initiator.politicalTypeCode ? layui.dict.getByCode(result.initiator.politicalTypeCode).name : '');
            $("#language").text(result.leader.language ? layui.dict.getByCode(result.leader.language).name : '');
            $("#degreeTypeCode").text(result.leader.degreeTypeCode ? layui.dict.getByCode(result.leader.degreeTypeCode).name : '');
            $("#tutorTypeCode").text(result.leader.tutorTypeCode ? layui.dict.getByCode(result.leader.tutorTypeCode).name : '');
            $("#identityTypeCode").text(result.leader.identityTypeCode ? layui.dict.getByCode(result.leader.identityTypeCode).name : '');
            $("#initiator-identityTypeCode").text(result.initiator.identityTypeCode ? layui.dict.getByCode(result.initiator.identityTypeCode).name : '');
            $("#levelTypeCode").text(result.levelTypeCode ? layui.dict.getByCode(result.levelTypeCode).name : '');

            if (result.isItemPublish && result.itemFileId) {
                $("#upload-file-end-a").text('点击下载');
                $("#upload-file-end-a")[0].setAttribute('href', ctx + 'download/' + result.itemFileId)
            } else {
                $("#upload-file-end-a").text('无附件');
            }

            if (result.statusTypeCode === 'conclude_failed') {
                $('#second-off-time').text(result.latestApplyTime ? layui.util.toDateString(result.latestApplyTime, 'yyyy-MM-dd') : '');
            }
        }

        function achievementFormTypeCodeName(data) {
            let dicts = layui.dict.getByCodes(data.split(','))
            let name = ''
            for (let i = 0; i < dicts.length; i++) {
                name += dicts[i].name + ','
            }
            return name
        }

        let $clean = $('#clean');
        $clean.on('click', function () {
            let currentUrl = window.location.hash.replace('#', '');
            website.view.tab.del(currentUrl);
            window.location.reload();
        })
    })


</script>